package com.chuhe.common.constans;

import com.chuhe.common.domain.enums.UserContactTypeEnum;

/**
 * @Author: 楚河
 * @Date: 2025年05月10日22:48
 */
public class MyConstants {
    // Integer
    public static final Integer LENGTH_0 = 0;
    public static final Integer LENGTH_10 = 10;
    public static final Integer LENGTH_11 = 11;
    public static final Integer LENGTH_20 = 20;
    public static final Integer ZERO = 0;

    // long
    public static final long SECOND_60 = 60;
    //字符常量
    public static final String REDIS_KEY_CHECK_CODE = "easychat:checkcode:";
    //用户联系人列表
    public static final String REDIS_KEY_USER_CONTACT = "easychat:ws:user:contact:";
    //userId
    public static final String REDIS_KEY_WS_TOKEN_USERID = "easychat:ws:token:userid";
    //用户心跳
    public static final String REDIS_KEY_WS_USER_HEART_BEAT = "easychat:ws:user:heartbeat";
    //token
    public static final String REDIS_KEY_WS_TOKEN = "easychat:ws:token:";
    //过期时间
    public static final Integer REDIS_KEY_EXPIRES_ONE_MIN = 60;
    public static final Integer REDIS_KEY_EXPIRES_HEART_BEAT = 6;
    public static final Integer REDIS_KEY_EXPIRES_DAY = REDIS_KEY_EXPIRES_ONE_MIN * 60 * 24;
    public static final Integer REDIS_KEY_TOKEN_EXPIRES = REDIS_KEY_EXPIRES_DAY * 2;
    public static final Long MILLISECOND_3DAYS_AGO = 3 * 24 * 60 * 60 * 1000L;

    //文件目录
    public static final String FILE_FOLDER_TEMP = "temp/";
    public static final String FILE_FOLDER_FILE = "file/";
    public static final String FILE_FOLDER_AVATAR_NAME = "avatar/";
    //后缀名
    public static final String IMAGE_SUFFIX = ".png";
    public static final String COVER_IMAGE_SUFFIX = "_cover.png";
    public static final String[] IMAGE_SUFFIX_LIST = new String[]{".jpeg", ".jpg", ".png", ".gif", ".bmp", ".webp"};

    public static final String[] VIDEO_SUFFIX_LIST = new String[]{".mp4", ".avi", ".rmvb", ".mkv", ".mov"};

    public static final Long FILE_SIZE_MB = 1024 * 1024L;
    //用户参与的会话列表
    public static final String ROBOT_UID = UserContactTypeEnum.USER.getPrefix() + "robot";
    //系统设置
    public static final String REDIS_KEY_SYS_SETTING = "easychat:syssetting:";
    //申请信息模板
    public static final String APPLY_INFO_TEMPLATE = "我是%s";
}
